package com.ohc.其它.语法;

import java.util.PriorityQueue;

public class Test {

    public static void main(String[] args) {
        PriorityQueue<Integer> minHeap = new PriorityQueue<>();
        minHeap.add(10);
        minHeap.add(8);
        minHeap.add(9);

        while (!minHeap.isEmpty()) {
            Integer poll = minHeap.poll();
            System.out.println("poll = " + poll);
        }
    }
    // 10 9 8
}
